// 
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Lesser General Public License for more details.
// 
// You should have received a copy of the GNU Lesser General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

//!DESC NNEDI3 (double_y, nns32, win8x4)
//!HOOK LUMA
//!BIND HOOKED
//!SAVE nnedi3_int
//!WHEN HOOKED.h OUTPUT.h / 0.833333 <
float nnedi3(vec4 samples[8]) {
float sum = 0.0, sumsq = 0.0;
for (int i = 0; i < 8; i++) {
    sum += dot(samples[i], vec4(1.0));
    sumsq += dot(samples[i], samples[i]);
}
float mstd0 = sum / 32.0;
float mstd1 = sumsq / 32.0 - mstd0 * mstd0;
float mstd2 = mix(0.0, inversesqrt(mstd1), mstd1 >= 1.192092896e-7);
mstd1 *= mstd2;
float vsum = 0.0, wsum = 0.0, sum1, sum2;
#define T(x) intBitsToFloat(x)
#define W(i,w0,w1,w2,w3) dot(samples[i],vec4(T(w0),T(w1),T(w2),T(w3)))
#define WS(w0,w1) sum1 = exp(sum1 * mstd2 + T(w0)); sum2 = sum2 * mstd2 + T(w1); wsum += sum1; vsum += sum1*(sum2/(1.0+abs(sum2)));
sum1=W(0,-1091571194,-1095740683,1039469975,1036208225)+W(1,1032174663,1026075554,1028885330,1048590727)+W(2,-1097328754,1025116802,1039536921,1027560868)+W(3,1023201972,1042058704,1017576356,1039928979)+W(4,1043923973,1049700439,1035622988,-1144450173)+W(5,1033278580,1046104373,-1090255529,-1098962113)+W(6,1024545936,1047463785,1029776426,1024461970)+W(7,1035224848,1043393326,-1090407950,-1100301043);sum2=W(0,1055965966,-1101782718,-1166389754,-1098253927)+W(1,-1096709168,-1105895383,983512221,1006679350)+W(2,1045236553,-1132225959,1034460863,-1106582410)+W(3,1040768379,1030302550,-1090237017,-1097283179)+W(4,1057568628,1055278331,-1113669665,1027738130)+W(5,-1111760224,1033275358,-1133967067,1036184228)+W(6,-1127810369,-1108092808,-1129223232,1016925525)+W(7,-1104949250,1045297871,1009711002,1022264595);WS(-1080723616,-1076327864);
sum1=W(0,-1106293281,1024505865,-1140602116,1017315691)+W(1,-1113397025,1022464939,-1129176587,1041272315)+W(2,-1101486193,1027220277,-1107192473,1037257964)+W(3,1024865293,1043879330,-1098639185,1040932726)+W(4,1032001763,-1106692027,1022805527,1022003974)+W(5,-1118929755,-1123579783,1038889695,1032224091)+W(6,1020788295,-1109388172,1014959990,1021604747)+W(7,-1117432531,998707020,1036681163,1019749115);sum2=W(0,-1127131649,1016927815,-1140061902,1015755803)+W(1,1033341381,1024947773,-1129880851,-1137718334)+W(2,-1112279061,-1095938931,1032555441,-1129835189)+W(3,1058036499,1079454606,-1069364926,-1089663810)+W(4,-1116204914,1009679614,-1123339814,-1138877514)+W(5,1053318688,1022404175,-1148409052,-1092530653)+W(6,-1153656135,-1146249364,-1165772366,1016646759)+W(7,1028043253,1025789685,1018619187,-1122312216);WS(1058954560,1004956589);
sum1=W(0,-1102342440,-1105082889,1038458494,-1128607008)+W(1,1038455278,-1156235011,-1147341058,1027139080)+W(2,-1085974686,1047296084,1026348672,1047693245)+W(3,-1103441674,1029167261,-1100046248,1057887999)+W(4,1058722958,-1135229473,-1116524774,-1108459679)+W(5,1033885827,1027001826,1043502422,-1087115665)+W(6,1019546620,-1122816147,-1117551096,1024592800)+W(7,-1124163292,1023459588,1043995308,1020243248);sum2=W(0,1032715073,1035295215,-1116902056,1039897191)+W(1,-1103487249,-1118716257,-1120385367,-1104821098)+W(2,1051413477,-1089611288,-1116419565,-1115617116)+W(3,-1091510775,1048354743,-1132652148,1060018690)+W(4,1039274043,-1102315300,1003022729,-1121428266)+W(5,1040404198,1037629937,-1117381948,1008252604)+W(6,1012620980,1023483611,-1161229156,1032782009)+W(7,1035102099,-1132320852,-1116040249,-1113601670);WS(-1088253760,-1127575790);
sum1=W(0,-1156102863,1042126700,1033404580,1038728366)+W(1,1011512228,1043566527,-1111684630,1036225546)+W(2,-1099951467,-1083618166,1045370723,1036121471)+W(3,1032168346,1050156122,-1088174091,1050604224)+W(4,1040753147,-1099186053,1036217881,994877095)+W(5,1037663513,1034991255,1039701042,-1098202972)+W(6,1033329669,-1099351704,1040247041,1012008372)+W(7,1030253051,1041638884,1032444126,1015138122);sum2=W(0,-1147399085,1025260806,1009286759,1030438042)+W(1,-1109485523,-1143426189,-1086940227,-1093920639)+W(2,1032031341,1065802217,1019667875,1027607240)+W(3,-1114490725,-1135657207,1049694895,-1090745109)+W(4,1046766533,-1110418147,1032828373,-1113200383)+W(5,1032826151,1024844082,1041550488,-1117099650)+W(6,-1137630919,-1119451994,1008172775,-1125602091)+W(7,993352218,-1137428855,1034586333,-1114583845);WS(-1079364256,1057874888);
sum1=W(0,1023431711,1034807569,1028964378,1038744583)+W(1,1027252187,1030066159,-1105253352,-1097930673)+W(2,1043817591,-1093522810,1044691424,1038770168)+W(3,1037737491,1045101529,-1085514994,-1095573950)+W(4,1033837359,1026052487,1031872786,1039465822)+W(5,1019830473,1014931844,1038514603,-1111615463)+W(6,1024735357,1032349913,1026510455,1031706975)+W(7,1030853165,1025856707,1036441879,1029114647);sum2=W(0,1023276596,1020476676,-1122608874,-1110129969)+W(1,-1115008651,-1145788944,-1106237621,1028080466)+W(2,1055608478,1056514262,1036903789,-1109784187)+W(3,-1135649000,1034305529,-1099727798,-1110801543)+W(4,-1122102418,1032271709,-1134147112,1016388156)+W(5,1019861916,-1104837577,-1114242709,1033517697)+W(6,-1109100200,1030585586,-1114085729,1025386706)+W(7,1027443202,-1105665752,-1128034084,-1110189468);WS(-1091483264,-1079194671);
sum1=W(0,-1116837930,1032278999,-1113984995,-1131351604)+W(1,1024497830,-1120582522,987288903,-1139989065)+W(2,-1099425098,1045060919,-1116327562,1021186040)+W(3,-1105371085,-1115581427,1046630795,1055014512)+W(4,1054575181,-1113261897,-1206829265,-1132080655)+W(5,1026057008,-1110689206,1027226210,-1092379987)+W(6,-1130307600,-1115285054,-1126861572,1023600234)+W(7,-1130576880,-1136751161,1003385298,-1122295330);sum2=W(0,1004745569,-1114381934,1028468886,-1129629424)+W(1,1021845392,1000184001,1032075412,1012138921)+W(2,1032177433,1051604488,-1136732761,-1120636360)+W(3,1017905952,-1141636449,-1122709320,-1114041388)+W(4,-1115452378,1026786204,1022425868,1036262769)+W(5,-1138562729,1006971361,-1102674451,-1105925279)+W(6,-1123076816,-1139760465,-1123045172,1019955588)+W(7,-1146151969,-1127921184,-1135173233,1002766561);WS(1067689632,-1150117831);
sum1=W(0,1047555836,1029999475,-1130553174,-1109849008)+W(1,-1099893915,-1113991840,-1114674616,1035630764)+W(2,1050420518,-1116179871,1036413160,-1123520321)+W(3,-1107722684,-1150636351,-1098283742,1040630545)+W(4,1035246488,-1104890550,-1127374955,1029117869)+W(5,1041501593,1019029347,-1116392999,1031697439)+W(6,1020611803,-1113066609,1027561031,-1140464318)+W(7,1031847583,1006720846,-1114557056,-1125473743);sum2=W(0,1032483043,1037446674,-1114467512,1032302578)+W(1,-1089061083,-1095432519,1053856893,1055539881)+W(2,-1114962225,-1107033941,-1140727686,1035589071)+W(3,-1087688027,-1119624965,1044678306,1060021172)+W(4,1017647091,-1102520792,-1123814512,1028178655)+W(5,1060967891,1056004093,-1096729370,-1086216329)+W(6,1028700703,-1106445462,-1114865396,-1131958732)+W(7,1046082925,1049601918,-1103816765,-1098594526);WS(1053174400,-1151490459);
sum1=W(0,1032070534,-1116405775,-1147738936,-1122069115)+W(1,1016988943,-1131178679,1015337751,-1106451229)+W(2,1043517586,-1108806494,1032697654,1027718109)+W(3,1030116243,1014470144,-1117317899,-1118269791)+W(4,1041596435,1030488179,-1112696969,1025368761)+W(5,-1112007328,1036691591,-1098708424,1044803791)+W(6,-1145227340,1032005679,-1121758051,1007532846)+W(7,-1121635481,1025294511,-1105947015,1024445699);sum2=W(0,-1130068082,-1126516206,1021517080,1030975148)+W(1,1009416079,1014043007,1010660367,-1128045540)+W(2,-1091517508,-1071480833,1077778659,1055956931)+W(3,-1124472846,1028586964,-1096786527,-1115164896)+W(4,-1089646275,-1129174056,1029844584,1057214094)+W(5,1004868686,-1122799750,1010452735,-1109767888)+W(6,-1116251741,998387790,1021753404,1029913248)+W(7,1023899390,-1126055830,-1161269496,-1130073888);WS(1064255296,1017910760);
sum1=W(0,1054734130,1053450179,-1112041607,1034554881)+W(1,-1127407003,-1117294562,1024002066,-1098111935)+W(2,1051103338,1044871248,-1098306542,-1108750194)+W(3,1016696883,-1097130662,1046694116,-1095577677)+W(4,-1103441076,1027829882,-1117661336,-1140839485)+W(5,983357671,-1104687573,1048629833,-1111281057)+W(6,-1122634224,1024857124,-1131295699,-1142577806)+W(7,-1118108640,-1098281839,1048835924,1032310597);sum2=W(0,1053966016,1073793292,1032914397,-1120767464)+W(1,-1147532546,-1129131123,1040357442,1035968374)+W(2,1060302091,-1072585870,1040094052,-1109760249)+W(3,-1130362887,-1116834009,-1086238928,-1122023462)+W(4,-1094220304,-1113143087,1009241688,1016200567)+W(5,1036030945,1015923256,1043210576,-1172011891)+W(6,1028063795,-1104349617,1032959032,-1122384418)+W(7,1017132829,1019714285,-1119727737,1025380203);WS(-1096343168,-1126236522);
sum1=W(0,-1108689250,-1119306439,1007810299,1030703603)+W(1,-1121378303,-1127608870,1031818658,1038321302)+W(2,-1096469888,-1085509191,1047119465,1040041675)+W(3,-1126859158,1045457184,-1089344732,1053153171)+W(4,1056154112,1020253526,-1132527909,-1113575360)+W(5,-1144694086,1029954693,999324634,1045446045)+W(6,1041829816,1033231243,1009418349,-1134236941)+W(7,1019451938,1026209383,-1107897834,-1115315934);sum2=W(0,1020456556,-1144975071,1016178696,983284602)+W(1,1015204808,1022946788,-1131007184,-1131636264)+W(2,-1114118472,1041996066,1029986296,1029794920)+W(3,998054973,1023304596,1053737341,997214653)+W(4,-1139464095,-1114876306,-1131549160,-1109420788)+W(5,1029400914,1024576522,-1113647896,-1097949071)+W(6,1015095008,983229178,-1117716768,-1118046352)+W(7,-1124860928,-1131778280,-1141234271,-1115559594);WS(1054415488,1031748714);
sum1=W(0,1016814449,1048190511,-1106849745,1032036500)+W(1,1018567785,-1119790601,-1110288412,-1098109636)+W(2,1025341687,1051815981,998976710,1032905605)+W(3,1041909072,1029877301,1042721902,-1090213441)+W(4,-1102465150,-1113968464,1024707071,1035586875)+W(5,1033626399,-1106536335,1046144796,-1117518441)+W(6,-1127337837,-1115415046,1040319748,-1137244643)+W(7,1018599181,-1122513053,-1135047459,-1117570737);sum2=W(0,-1103416430,-1121991569,-1138393335,990440998)+W(1,1034530622,-1117267403,1037302636,-1120602807)+W(2,-1128966950,-1100463136,1002996807,-1115155620)+W(3,1032576586,-1114490937,1060125031,-1098451061)+W(4,-1095499559,1010012987,-1107496177,-1122715509)+W(5,-1120765719,-1126507430,1038403096,1057202890)+W(6,1000571127,1048400711,-1100731818,-1109700727)+W(7,1027555951,-1105804206,1041385707,1011003397);WS(1057399616,1074070393);
sum1=W(0,1049855515,1048650971,-1167692925,-1116946950)+W(1,1045229301,1041758026,-1103643414,-1097294408)+W(2,1035712138,-1096264273,1027460150,1025124136)+W(3,1045455640,1036926493,-1106323062,-1094845877)+W(4,-1093603523,-1089515076,1043057687,1033233658)+W(5,1036007790,-1123310040,1057610273,1045414146)+W(6,-1102565613,-1089497938,1036180887,1031827147)+W(7,1012034194,1034964477,1048651645,1043872372);sum2=W(0,-1135117191,-1104821294,1016280180,-1099019906)+W(1,-1102919364,1021862852,-1108236474,1053230727)+W(2,1031344902,1057285857,-1160553787,-1104956478)+W(3,-1102746088,-1121198562,1060881655,1044240449)+W(4,-1108143797,-1096822242,1040551613,-1115190705)+W(5,-1107568696,1027740054,-1110487530,-1141578351)+W(6,-1121444630,-1108844527,1043284947,-1110901592)+W(7,-1115478973,1039050835,-1097266933,1033167055);WS(-1079272096,-1088198283);
sum1=W(0,-1112293630,-1147892734,-1136809437,-1150549691)+W(1,-1117531256,1024124492,-1131332343,1038263474)+W(2,-1101200910,-1153686203,-1114730926,1035238887)+W(3,1022854919,1038223988,-1109365886,1042949876)+W(4,1033312670,-1111552818,1024493634,1013948517)+W(5,-1137128325,-1131368443,1033656538,-1123815596)+W(6,993656219,-1115285591,1007675727,1014747375)+W(7,-1123012682,983503863,1031561484,999554974);sum2=W(0,-1131869901,973137042,933663296,-1130912341)+W(1,-1116201618,-1114826138,1031913949,1021624533)+W(2,1022547165,-1103034755,1026863962,1024898014)+W(3,-1097351564,-1074065991,1074345895,1049231168)+W(4,1032168251,-1122671508,1015250909,1006981209)+W(5,-1101411998,-1116799454,1033396431,1046910286)+W(6,1002623282,-1124284861,-1163156681,-1128875465)+W(7,-1122428830,-1131138133,987851849,1015118461);WS(1066898592,-1135257599);
sum1=W(0,1039457202,1036077428,-1104421608,-1110180874)+W(1,1033603984,1025966004,-1109956850,-1099722419)+W(2,1042328969,1047234565,-1109212258,-1108282395)+W(3,1027866348,-1127852161,1050666829,-1108344348)+W(4,-1102031401,-1101771699,-1104815307,-1112266449)+W(5,-1117920074,-1103088922,1056795268,1052651555)+W(6,-1107974833,-1105991798,-1107536862,-1117810340)+W(7,-1114797145,-1109126692,1052879183,1044347095);sum2=W(0,1053252716,-1099761318,-1130272686,-1109573955)+W(1,-1104024699,-1113318439,1023415227,-1111963093)+W(2,1053124236,1015950468,-1135365682,-1112628352)+W(3,-1113101390,989675628,-1098416341,1036225124)+W(4,1055173972,1056516595,-1109041460,-1127976571)+W(5,-1113626094,1021900236,-1099834172,984548524)+W(6,-1111992284,-1111067004,-1124075328,-1141484375)+W(7,-1121224929,1035158074,-1123095583,-1115296758);WS(-1080514464,1071098312);
sum1=W(0,-1104998922,-1109637973,1032590577,1029423638)+W(1,-1121480226,-1116754806,1035675859,1034143047)+W(2,-1100165641,1052963835,1032314563,1026820152)+W(3,-1119258414,-1124675269,1044386890,1041959039)+W(4,1049180397,1051364482,-1118573868,-1121041060)+W(5,-1141724766,1026232616,-1091683740,-1094089003)+W(6,1040988017,1046351030,-1138006521,-1120807462)+W(7,-1142663074,-1128189972,-1100071438,-1104568584);sum2=W(0,1047440331,-1161898742,1015651007,-1103917515)+W(1,-1101094893,1034127906,-1107946310,1045127249)+W(2,1037971494,1064882055,-1102760582,-1110033797)+W(3,-1105034150,-1105985747,1062501861,1032097498)+W(4,-1094052244,-1095531648,1038662254,-1111112749)+W(5,952358760,1029080884,-1103513552,-1097807648)+W(6,1028288648,-1103088589,1037944898,-1114159185)+W(7,-1115269879,1036625418,-1103412727,1000704926);WS(1048356096,1025975827);
sum1=W(0,1042988217,1042373466,-1122099232,-1127785256)+W(1,-1113788528,985728647,-1109964850,-1143337570)+W(2,1057753530,1024353684,1026577988,-1101696686)+W(3,981326605,1025248769,1027827940,-1091154007)+W(4,-1089144738,-1100403603,1035389109,1038799529)+W(5,1031883373,1042938314,-1125657656,1052285203)+W(6,-1117105634,-1118224663,1026531900,1026796836)+W(7,1041478413,1024598728,-1110632314,-1109515886);sum2=W(0,-1127410563,-1105350472,-1116521159,1012220951)+W(1,-1150652997,-1121646209,1023881724,-1133847817)+W(2,1052174871,-1097063130,1029633040,-1112142878)+W(3,-1123898264,1019540966,-1106094805,1044599155)+W(4,-1157154125,1029744370,-1123437332,-1134401830)+W(5,-1101447493,-1113752268,-1111846084,1059986787)+W(6,-1133421881,1031896001,-1127142758,-1127274631)+W(7,-1115689394,-1144497399,-1111750394,1028497368);WS(1047538944,-1094881626);
sum1=W(0,1026526343,1015768341,-1116924690,-1131292909)+W(1,-1137761291,-1105713526,1040643394,-1137367995)+W(2,1061821276,1006944475,1021777101,-1112297452)+W(3,1031500559,-1122499811,-1090839121,-1088680894)+W(4,-1091685625,1042550748,-1116873677,1043477817)+W(5,-1107169411,-1119456201,-1162815447,1059324523)+W(6,-1112344306,1025260793,-1142312694,-1148100662)+W(7,998501030,1032218389,1009991259,1036475455);sum2=W(0,-1112001321,-1114299623,1027383442,1018368946)+W(1,-1136144308,995591994,-1113414147,-1120361628)+W(2,-1159080892,1048017951,-1120907217,1026347909)+W(3,-1130300135,-1113455406,1047229175,-1114902877)+W(4,1043117803,-1117678872,1015876554,-1113638165)+W(5,-1104824263,-1135559770,-1153448320,1034197636)+W(6,1016312397,-1122492527,-1157376536,-1121952605)+W(7,-1116260909,1024817261,-1146986041,1030999359);WS(1059019584,-1093542352);
sum1=W(0,1030085820,-1117660736,1036739212,-1118590060)+W(1,-1139295455,1017695255,1037660574,1044414089)+W(2,1053611807,-1088498407,1044992135,-1117950862)+W(3,-1132182919,1041445842,-1087395836,1035930184)+W(4,-1106481599,1041316489,-1157350427,1031932973)+W(5,-1162575911,1028651518,-1101366685,1044296603)+W(6,1033416637,1042914684,-1135788111,1018600951)+W(7,1029799946,1024137952,-1105147443,-1113146202);sum2=W(0,-1098733365,-1096002059,-1129149604,-1139124704)+W(1,1017748092,-1120672660,-1139933424,-1134878408)+W(2,-1099326395,1042574015,1041796064,-1112674264)+W(3,1007868832,1038924927,1054885382,1006823136)+W(4,993486752,1013026008,983636161,1023328190)+W(5,-1118903044,-1117420588,1012616072,1040771663)+W(6,-1121650464,1025526661,968306692,-1131439188)+W(7,1032346590,1016029412,1007743024,-1119789204);WS(1034201600,1032755867);
sum1=W(0,-1096012775,-1105013167,1027758260,-1153568391)+W(1,-1151613767,-1113241540,1040809774,1054286804)+W(2,-1096428191,1052356477,-1106713574,-1120836106)+W(3,-1109787424,-1103823871,1045456334,1052819554)+W(4,1040996254,1046162344,-1113115007,-1110497539)+W(5,-1140335480,-1136669162,-1106901340,-1104715738)+W(6,1026611286,1046578147,-1106649828,-1129181937)+W(7,-1129950605,1018423993,-1111616164,-1119554608);sum2=W(0,1046553581,1044137813,-1114916062,-1116195452)+W(1,-1133268119,1023665145,1067697792,1060291180)+W(2,1039450853,-1081686100,1031939547,1015539387)+W(3,1037512606,1033868463,-1075409426,1056432615)+W(4,-1106570618,1023858175,1002967134,1004500534)+W(5,1015733077,-1120650920,1018449047,-1100622921)+W(6,1032662783,1018521363,1037899637,-1116253852)+W(7,1016550645,1008358731,-1106597825,1002080710);WS(-1092032128,-1114982082);
sum1=W(0,-1092594901,-1096516325,1030256707,1022785838)+W(1,-1131318086,-1117764855,1038780564,1053421570)+W(2,-1091986421,1046024022,-1129380878,1019093490)+W(3,-1114799192,-1136363407,1055287349,1047196191)+W(4,-1122621159,1047446468,-1112386231,-1136259347)+W(5,-1144800614,1031400745,-1103792760,-1127922606)+W(6,983613607,1044817638,-1105547264,-1119087591)+W(7,-1141783466,1035179430,-1107803612,-1127804734);sum2=W(0,-1101864626,-1105911709,-1122718101,1041280609)+W(1,1033694830,-1107222411,-1103824921,-1094055741)+W(2,-1098031958,1058683727,-1105883428,1032208518)+W(3,-1124818562,-1108861898,1064792422,-1096453130)+W(4,-1120084233,1049511237,-1105712369,1032385022)+W(5,-1126293810,-1108778587,1028614917,1036982526)+W(6,-1101782173,1048360263,-1100029914,1026423073)+W(7,1022233154,-1104838815,1045846387,1024411853);WS(-1109129728,1010433912);
sum1=W(0,-1096823624,-1105899410,1006908285,-1117250164)+W(1,1019407999,-1137630799,1019351431,1040646763)+W(2,-1092542200,1057728383,-1107144297,-1122855062)+W(3,-1109418342,-1105008732,1064635860,1052048931)+W(4,1037050434,1026000812,-1123315850,-1106683568)+W(5,-1114857797,1029923270,-1107858814,-1117087348)+W(6,-1117617698,-1122267030,-1125685047,-1130212999)+W(7,-1137382471,1034575732,-1100117973,-1107016783);sum2=W(0,-1138461074,1040260969,-1146428548,-1153548328)+W(1,970383811,1016706951,-1109276610,-1109953492)+W(2,1050908092,1057542522,-1131960189,-1122720334)+W(3,-1113772244,-1149783528,-1109440842,-1119113122)+W(4,1046314824,-1105004761,-1140382642,-1105417557)+W(5,-1111645386,-1114961145,-1140136790,1008998438)+W(6,1024281381,-1110366356,1025793768,-1130524097)+W(7,-1128062487,-1113390177,-1135544654,-1119699464);WS(1028043776,1066748487);
sum1=W(0,1042153037,-1142684082,1029235758,1020869188)+W(1,-1111756535,1025123714,-1109061593,-1114798157)+W(2,1055996350,1053860476,1035504777,-1130366216)+W(3,1039957533,1020063133,1054127718,-1084468040)+W(4,-1085695847,-1103910983,1028701624,1043701316)+W(5,1020852591,1027291444,-1111428405,1050138268)+W(6,-1112356264,-1125763849,-1122144394,-1140377801)+W(7,1023500800,-1137256281,-1122964802,-1142788434);sum2=W(0,-1129530165,-1119644642,924100096,-1124029698)+W(1,1021970837,-1133743274,1007880106,-1125964837)+W(2,-1119677450,1050522694,-1110737625,-1114278109)+W(3,-1118803866,-1114387111,1051750384,1030663674)+W(4,1031715210,-1121636434,-1121059730,-1113250169)+W(5,999385235,1025411170,-1117515026,-1120664914)+W(6,-1145009875,-1119348450,-1125884533,998717971)+W(7,1019195093,-1127692741,1010693450,-1122454562);WS(1060837696,-1133947077);
sum1=W(0,1043511426,-1107876293,1028161858,-1111653883)+W(1,-1102491073,-1120891991,1015032078,1035524535)+W(2,1032976162,-1100826286,1035200691,1026751705)+W(3,-1107214884,-1125941943,-1104551490,1051427819)+W(4,1046154066,-1109841015,-1124636570,1000443428)+W(5,1038586510,1029969865,-1105048272,1014718172)+W(6,1028652293,-1123706233,1010162044,-1153569903)+W(7,1023653077,990755503,-1122173975,-1150803951);sum2=W(0,-1124907300,-1130116966,1027230711,-1109148006)+W(1,1058387135,1052271642,-1092832201,-1092637531)+W(2,-1099589874,1033368851,-1115012616,-1141349815)+W(3,1062146597,1019043320,1040685020,-1085994041)+W(4,-1097709653,1048790586,-1129789352,1025861327)+W(5,-1085821967,-1089224415,1056989663,1063174823)+W(6,-1111271581,1042673858,1031045509,1018453676)+W(7,-1100831168,-1096709646,1044673285,1049450817);WS(1052991104,1024635730);
sum1=W(0,1054985227,1053766219,-1113667962,1035832004)+W(1,-1119430356,-1121298600,1027437528,-1101014640)+W(2,1046292645,-1128304655,-1099876558,-1115665493)+W(3,1029858016,-1098528437,-1148766910,-1097461637)+W(4,-1115760280,1032906080,-1123144798,-1124670698)+W(5,1026860541,-1107490221,1048476772,-1103841730)+W(6,1011324759,1032830229,991927035,-1141396670)+W(7,-1114702739,-1098098175,1048946541,1034147624);sum2=W(0,-1101540780,-1081244300,-1123155104,1023525971)+W(1,-1124206084,989815561,-1107189914,-1109590196)+W(2,-1094597742,1068940029,-1119336486,1037524511)+W(3,979200786,1039597181,1038949441,1026840221)+W(4,1051860638,998725346,-1140931614,-1120201684)+W(5,-1126284432,-1128575576,-1110977051,1014639773)+W(6,1002156586,1038812729,-1116496860,1025256785)+W(7,-1123250336,-1117282785,1033886084,-1117345859);WS(-1106197760,-1107941957);
sum1=W(0,958134964,-1096404880,992223587,-1126741205)+W(1,-1131232109,-1156891819,-1114006205,1042417753)+W(2,1050569383,-1089676235,-1096167611,-1103296147)+W(3,-1104768673,-1105076618,-1101748223,1053212362)+W(4,1032016157,1020956357,1041994672,-1103227950)+W(5,-1101041056,-1124618361,1042030605,1057274419)+W(6,-1180953690,1043412107,1027666259,-1124973941)+W(7,-1114495652,-1117167007,1052224033,1049652990);sum2=W(0,1033666378,1045400432,-1149001791,-1114619118)+W(1,1027002418,-1125963088,-1103940412,1015708744)+W(2,924614016,1063026008,-1090736686,-1110825372)+W(3,-1103385448,-1091159350,1059931802,-1107881456)+W(4,-1114127208,-1108719036,1027272732,-1106216772)+W(5,-1139192735,-1125128312,1024735270,-1107266078)+W(6,1032301903,-1114760302,-1120615480,1033544093)+W(7,1019689496,1032462491,1034226031,-1134995311);WS(-1076602784,-1079939509);
sum1=W(0,-1103738752,-1119780485,-1124683769,1033209209)+W(1,1002177000,-1112424745,1041533536,1025390185)+W(2,-1096323000,1042233324,-1141354248,1015980198)+W(3,-1104846498,-1113895617,1039917313,1052087227)+W(4,1054450248,1052850909,-1114123684,-1106007132)+W(5,-1119444855,-1112376802,-1098158311,-1105614956)+W(6,1043529432,1045060053,1019464370,-1121157953)+W(7,1021969694,-1109951699,-1103437636,-1107965437);sum2=W(0,-1106233686,-1117977933,-1119329897,1032197744)+W(1,1036373860,-1113988579,1035649904,-1119285117)+W(2,-1119744119,-1074309068,1042368013,1026978731)+W(3,-1150690390,-1148379867,-1080074847,1046616172)+W(4,1068607081,1064708176,-1109569271,1034747948)+W(5,1031972703,-1113275705,1043980108,1045039448)+W(6,-1119111329,1041980892,-1111213511,1037031349)+W(7,1015848847,1008019670,1028259198,1029320825);WS(-1093673600,-1131421273);
sum1=W(0,-1114120908,-1110871822,-1126420325,-1121371719)+W(1,1009001293,1008740253,1021798446,1035660544)+W(2,-1087025669,-1118558279,1021303790,1033366837)+W(3,-1120291359,1022689127,1042294182,1058317703)+W(4,1056872571,1032969664,1011797877,-1117842165)+W(5,1031810222,-1148303562,-1114500968,-1088792724)+W(6,1037611499,1040800018,-1131840478,1021502382)+W(7,-1137856917,-1121301883,1017988942,-1111697864);sum2=W(0,-1114206314,-1119983153,-1129835426,-1145039688)+W(1,1020565626,1000979816,-1113040628,-1116540509)+W(2,-1121785409,1051729955,-1110668832,-1119915157)+W(3,989230112,-1112437186,1051989643,-1118504757)+W(4,1012089860,-1118223897,1002833896,-1111519800)+W(5,-1112214518,1015165050,1025479957,1039755978)+W(6,-1130809610,-1123764449,1006052904,-1127947266)+W(7,-1128941978,1025956493,-1127132522,-1158783904);WS(1065682080,-1111828541);
sum1=W(0,-1145885026,-1115077208,1017604463,1015869752)+W(1,-1126764880,1032942526,1021224792,1022264616)+W(2,1052074397,-1121697500,1024786188,-1112250175)+W(3,1040282413,1035803452,1047440331,-1089954536)+W(4,-1086889687,1045248549,1002255762,1036568133)+W(5,-1125683619,1031850711,-1109225970,1049268572)+W(6,-1130857684,1037568127,982208647,-1131800664)+W(7,-1141787602,1017131424,-1113425822,-1123514660);sum2=W(0,1016858600,968811648,1016040732,-1122978131)+W(1,993636865,-1144040913,1021399769,1028741871)+W(2,1029169324,1051074882,-1125004872,-1114060649)+W(3,-1118019503,-1109484363,1031746308,1032336595)+W(4,1006053609,-1154135582,1026938249,1029971540)+W(5,-1124468225,1013417282,-1113140779,-1103346234)+W(6,-1115290499,-1140773838,-1124460348,1017189437)+W(7,-1169769501,-1139883250,-1122277912,-1141169189);WS(1068575136,1057679145);
sum1=W(0,1049880682,1049251178,1008215334,-1106541599)+W(1,1052783569,1042509671,-1111487207,-1093397815)+W(2,1026486412,-1095539136,1042310507,989927934)+W(3,1051194971,1040579493,-1103138323,-1092992340)+W(4,-1094672658,-1089191083,1040070410,1018512183)+W(5,1038856114,-1114567880,1057944056,1043830943)+W(6,-1100618939,-1087252724,1041475113,1014261304)+W(7,1025292508,1038361721,1049811244,1044894993);sum2=W(0,1053593458,1055007475,-1136765855,-1114445084)+W(1,-1150175899,-1141017037,1054334485,1057823779)+W(2,-1105638736,-1078800745,-1113238946,1039574032)+W(3,1042094581,-1134493359,-1078443122,-1096181786)+W(4,-1104375874,1059224194,-1106803932,1030357662)+W(5,1020483059,-1099695416,1058193036,1049857835)+W(6,1050059734,1035501186,-1113028634,964162478)+W(7,-1118569338,-1110238952,1029634285,1043677394);WS(-1069843280,1043992756);
sum1=W(0,1027695014,-1119099178,-1135429253,-1124948267)+W(1,1008956039,-1129507307,1017935435,-1108770183)+W(2,1044103833,-1113789227,1025838726,1025550072)+W(3,1030807982,1014849865,-1130965835,-1112757821)+W(4,1039477491,1024839950,-1116233196,1019242118)+W(5,-1114625158,1035190516,-1101790135,1042243413)+W(6,-1142719774,1028120504,-1130610171,998797102)+W(7,-1127852007,1023573770,-1106167085,1012540023);sum2=W(0,1026300352,1028491168,-1121247640,-1114838118)+W(1,-1130791968,-1127851536,-1130258048,1004928481)+W(2,1053083344,1074653957,-1072953064,-1095359738)+W(3,1025789396,1030571860,-1102013621,1024432884)+W(4,1056568596,1033233928,-1115141896,-1093135708)+W(5,984097412,1025870428,-1116002270,1030571276)+W(6,1030713448,1023653964,-1127503160,-1116140314)+W(7,-1120604784,1016702232,-1129660856,1015669456);WS(1066802848,-1129257078);
sum1=W(0,1033473243,-1155453851,-1118978065,1015630667)+W(1,-1114728473,-1121467910,-1122431286,-1104672775)+W(2,1035395194,1065736411,-1101616805,-1113784260)+W(3,-1105320751,-1095556296,1061324843,-1115117829)+W(4,1045542397,1040181775,-1114908350,-1108037466)+W(5,-1104703871,-1109993148,-1114134583,-1100789945)+W(6,-1177594330,1036229652,-1111947911,-1114956027)+W(7,-1111474306,-1106051686,-1138173719,-1124148059);sum2=W(0,-1155123513,-1108713026,-1134031950,-1109560646)+W(1,-1115008786,1019412439,-1107664082,1035199782)+W(2,1038996664,1026897780,1017238679,-1107125821)+W(3,-1123597732,1016515095,1051508948,1043157052)+W(4,-1107646918,-1107869542,-1127256871,1024343484)+W(5,-1106563795,-1116358964,998755997,1055083262)+W(6,-1112902766,-1145442397,-1129735047,1004378333)+W(7,-1117600772,-1110777694,1012570830,-1159444594);WS(-1093453440,1062530498);
sum1=W(0,-1115495349,-1109318263,1018166794,-1124930739)+W(1,1023868966,1023563962,1039727605,1025637074)+W(2,1024699176,1040214918,-1114300581,-1109529502)+W(3,-1131885027,-1104984446,1052285453,931786146)+W(4,-1105577322,1043329716,1023247327,1025096231)+W(5,-1110072888,-1137647791,-1105534248,1009762919)+W(6,-1123543752,1034740398,-1125424515,998443854)+W(7,-1123805240,1018092315,-1116356474,988548151);sum2=W(0,1018118074,-1135013993,-1110334365,-1116378324)+W(1,-1110082211,-1111471528,1002595554,1027066059)+W(2,-1117515615,-1097345050,-1134041225,-1139723269)+W(3,-1114430561,1040454031,1043336959,1053899571)+W(4,1039717826,-1107830137,-1112237914,-1147091114)+W(5,1033656482,-1117546906,1010598309,1040668505)+W(6,1032288465,978891919,-1131603942,-1123080609)+W(7,-1115822981,-1119917138,1026333875,1016807738);WS(1067735712,-1080534052);
return clamp(mstd0 + 5.0 * vsum / wsum * mstd1, 0.0, 1.0);
}  // nnedi3
vec4 hook() {
vec4 ret = vec4(0.0);
vec4 samples[8];
samples[0] = HOOKED_mul * textureGatherOffset(HOOKED_raw, HOOKED_pos, ivec2(-3, -1), 0);
samples[1] = HOOKED_mul * textureGatherOffset(HOOKED_raw, HOOKED_pos, ivec2(-3, 1), 0);
samples[2] = HOOKED_mul * textureGatherOffset(HOOKED_raw, HOOKED_pos, ivec2(-1, -1), 0);
samples[3] = HOOKED_mul * textureGatherOffset(HOOKED_raw, HOOKED_pos, ivec2(-1, 1), 0);
samples[4] = HOOKED_mul * textureGatherOffset(HOOKED_raw, HOOKED_pos, ivec2(1, -1), 0);
samples[5] = HOOKED_mul * textureGatherOffset(HOOKED_raw, HOOKED_pos, ivec2(1, 1), 0);
samples[6] = HOOKED_mul * textureGatherOffset(HOOKED_raw, HOOKED_pos, ivec2(3, -1), 0);
samples[7] = HOOKED_mul * textureGatherOffset(HOOKED_raw, HOOKED_pos, ivec2(3, 1), 0);
ret[0] = nnedi3(samples);
return ret;
}  // hook
//!DESC NNEDI3 (combine_y, nns32, win8x4)
//!HOOK LUMA
//!BIND HOOKED
//!BIND nnedi3_int
//!HEIGHT 2 HOOKED.h *
//!OFFSET 0.000000 -0.500000
//!WHEN HOOKED.h OUTPUT.h / 0.833333 <
vec4 hook() {
    vec2 dir = fract(HOOKED_pos * HOOKED_size) - 0.5;
    if (dir.y < 0.0) {
        return HOOKED_texOff(-dir);
    } else {
        return nnedi3_int_texOff(-dir);
    }
}
//!DESC NNEDI3 (double_x, nns32, win8x4)
//!HOOK LUMA
//!BIND HOOKED
//!SAVE nnedi3_int
//!WHEN HOOKED.w OUTPUT.w / 0.833333 <
float nnedi3(vec4 samples[8]) {
float sum = 0.0, sumsq = 0.0;
for (int i = 0; i < 8; i++) {
    sum += dot(samples[i], vec4(1.0));
    sumsq += dot(samples[i], samples[i]);
}
float mstd0 = sum / 32.0;
float mstd1 = sumsq / 32.0 - mstd0 * mstd0;
float mstd2 = mix(0.0, inversesqrt(mstd1), mstd1 >= 1.192092896e-7);
mstd1 *= mstd2;
float vsum = 0.0, wsum = 0.0, sum1, sum2;
#define T(x) intBitsToFloat(x)
#define W(i,w0,w1,w2,w3) dot(samples[i],vec4(T(w0),T(w1),T(w2),T(w3)))
#define WS(w0,w1) sum1 = exp(sum1 * mstd2 + T(w0)); sum2 = sum2 * mstd2 + T(w1); wsum += sum1; vsum += sum1*(sum2/(1.0+abs(sum2)));
sum1=W(0,1039469975,-1095740683,-1091571194,1036208225)+W(1,1039536921,1025116802,-1097328754,1027560868)+W(2,1035622988,1049700439,1043923973,-1144450173)+W(3,1029776426,1047463785,1024545936,1024461970)+W(4,1028885330,1026075554,1032174663,1048590727)+W(5,1017576356,1042058704,1023201972,1039928979)+W(6,-1090255529,1046104373,1033278580,-1098962113)+W(7,-1090407950,1043393326,1035224848,-1100301043);sum2=W(0,-1166389754,-1101782718,1055965966,-1098253927)+W(1,1034460863,-1132225959,1045236553,-1106582410)+W(2,-1113669665,1055278331,1057568628,1027738130)+W(3,-1129223232,-1108092808,-1127810369,1016925525)+W(4,983512221,-1105895383,-1096709168,1006679350)+W(5,-1090237017,1030302550,1040768379,-1097283179)+W(6,-1133967067,1033275358,-1111760224,1036184228)+W(7,1009711002,1045297871,-1104949250,1022264595);WS(-1080723616,-1076327864);
sum1=W(0,-1140602116,1024505865,-1106293281,1017315691)+W(1,-1107192473,1027220277,-1101486193,1037257964)+W(2,1022805527,-1106692027,1032001763,1022003974)+W(3,1014959990,-1109388172,1020788295,1021604747)+W(4,-1129176587,1022464939,-1113397025,1041272315)+W(5,-1098639185,1043879330,1024865293,1040932726)+W(6,1038889695,-1123579783,-1118929755,1032224091)+W(7,1036681163,998707020,-1117432531,1019749115);sum2=W(0,-1140061902,1016927815,-1127131649,1015755803)+W(1,1032555441,-1095938931,-1112279061,-1129835189)+W(2,-1123339814,1009679614,-1116204914,-1138877514)+W(3,-1165772366,-1146249364,-1153656135,1016646759)+W(4,-1129880851,1024947773,1033341381,-1137718334)+W(5,-1069364926,1079454606,1058036499,-1089663810)+W(6,-1148409052,1022404175,1053318688,-1092530653)+W(7,1018619187,1025789685,1028043253,-1122312216);WS(1058954560,1004956589);
sum1=W(0,1038458494,-1105082889,-1102342440,-1128607008)+W(1,1026348672,1047296084,-1085974686,1047693245)+W(2,-1116524774,-1135229473,1058722958,-1108459679)+W(3,-1117551096,-1122816147,1019546620,1024592800)+W(4,-1147341058,-1156235011,1038455278,1027139080)+W(5,-1100046248,1029167261,-1103441674,1057887999)+W(6,1043502422,1027001826,1033885827,-1087115665)+W(7,1043995308,1023459588,-1124163292,1020243248);sum2=W(0,-1116902056,1035295215,1032715073,1039897191)+W(1,-1116419565,-1089611288,1051413477,-1115617116)+W(2,1003022729,-1102315300,1039274043,-1121428266)+W(3,-1161229156,1023483611,1012620980,1032782009)+W(4,-1120385367,-1118716257,-1103487249,-1104821098)+W(5,-1132652148,1048354743,-1091510775,1060018690)+W(6,-1117381948,1037629937,1040404198,1008252604)+W(7,-1116040249,-1132320852,1035102099,-1113601670);WS(-1088253760,-1127575790);
sum1=W(0,1033404580,1042126700,-1156102863,1038728366)+W(1,1045370723,-1083618166,-1099951467,1036121471)+W(2,1036217881,-1099186053,1040753147,994877095)+W(3,1040247041,-1099351704,1033329669,1012008372)+W(4,-1111684630,1043566527,1011512228,1036225546)+W(5,-1088174091,1050156122,1032168346,1050604224)+W(6,1039701042,1034991255,1037663513,-1098202972)+W(7,1032444126,1041638884,1030253051,1015138122);sum2=W(0,1009286759,1025260806,-1147399085,1030438042)+W(1,1019667875,1065802217,1032031341,1027607240)+W(2,1032828373,-1110418147,1046766533,-1113200383)+W(3,1008172775,-1119451994,-1137630919,-1125602091)+W(4,-1086940227,-1143426189,-1109485523,-1093920639)+W(5,1049694895,-1135657207,-1114490725,-1090745109)+W(6,1041550488,1024844082,1032826151,-1117099650)+W(7,1034586333,-1137428855,993352218,-1114583845);WS(-1079364256,1057874888);
sum1=W(0,1028964378,1034807569,1023431711,1038744583)+W(1,1044691424,-1093522810,1043817591,1038770168)+W(2,1031872786,1026052487,1033837359,1039465822)+W(3,1026510455,1032349913,1024735357,1031706975)+W(4,-1105253352,1030066159,1027252187,-1097930673)+W(5,-1085514994,1045101529,1037737491,-1095573950)+W(6,1038514603,1014931844,1019830473,-1111615463)+W(7,1036441879,1025856707,1030853165,1029114647);sum2=W(0,-1122608874,1020476676,1023276596,-1110129969)+W(1,1036903789,1056514262,1055608478,-1109784187)+W(2,-1134147112,1032271709,-1122102418,1016388156)+W(3,-1114085729,1030585586,-1109100200,1025386706)+W(4,-1106237621,-1145788944,-1115008651,1028080466)+W(5,-1099727798,1034305529,-1135649000,-1110801543)+W(6,-1114242709,-1104837577,1019861916,1033517697)+W(7,-1128034084,-1105665752,1027443202,-1110189468);WS(-1091483264,-1079194671);
sum1=W(0,-1113984995,1032278999,-1116837930,-1131351604)+W(1,-1116327562,1045060919,-1099425098,1021186040)+W(2,-1206829265,-1113261897,1054575181,-1132080655)+W(3,-1126861572,-1115285054,-1130307600,1023600234)+W(4,987288903,-1120582522,1024497830,-1139989065)+W(5,1046630795,-1115581427,-1105371085,1055014512)+W(6,1027226210,-1110689206,1026057008,-1092379987)+W(7,1003385298,-1136751161,-1130576880,-1122295330);sum2=W(0,1028468886,-1114381934,1004745569,-1129629424)+W(1,-1136732761,1051604488,1032177433,-1120636360)+W(2,1022425868,1026786204,-1115452378,1036262769)+W(3,-1123045172,-1139760465,-1123076816,1019955588)+W(4,1032075412,1000184001,1021845392,1012138921)+W(5,-1122709320,-1141636449,1017905952,-1114041388)+W(6,-1102674451,1006971361,-1138562729,-1105925279)+W(7,-1135173233,-1127921184,-1146151969,1002766561);WS(1067689632,-1150117831);
sum1=W(0,-1130553174,1029999475,1047555836,-1109849008)+W(1,1036413160,-1116179871,1050420518,-1123520321)+W(2,-1127374955,-1104890550,1035246488,1029117869)+W(3,1027561031,-1113066609,1020611803,-1140464318)+W(4,-1114674616,-1113991840,-1099893915,1035630764)+W(5,-1098283742,-1150636351,-1107722684,1040630545)+W(6,-1116392999,1019029347,1041501593,1031697439)+W(7,-1114557056,1006720846,1031847583,-1125473743);sum2=W(0,-1114467512,1037446674,1032483043,1032302578)+W(1,-1140727686,-1107033941,-1114962225,1035589071)+W(2,-1123814512,-1102520792,1017647091,1028178655)+W(3,-1114865396,-1106445462,1028700703,-1131958732)+W(4,1053856893,-1095432519,-1089061083,1055539881)+W(5,1044678306,-1119624965,-1087688027,1060021172)+W(6,-1096729370,1056004093,1060967891,-1086216329)+W(7,-1103816765,1049601918,1046082925,-1098594526);WS(1053174400,-1151490459);
sum1=W(0,-1147738936,-1116405775,1032070534,-1122069115)+W(1,1032697654,-1108806494,1043517586,1027718109)+W(2,-1112696969,1030488179,1041596435,1025368761)+W(3,-1121758051,1032005679,-1145227340,1007532846)+W(4,1015337751,-1131178679,1016988943,-1106451229)+W(5,-1117317899,1014470144,1030116243,-1118269791)+W(6,-1098708424,1036691591,-1112007328,1044803791)+W(7,-1105947015,1025294511,-1121635481,1024445699);sum2=W(0,1021517080,-1126516206,-1130068082,1030975148)+W(1,1077778659,-1071480833,-1091517508,1055956931)+W(2,1029844584,-1129174056,-1089646275,1057214094)+W(3,1021753404,998387790,-1116251741,1029913248)+W(4,1010660367,1014043007,1009416079,-1128045540)+W(5,-1096786527,1028586964,-1124472846,-1115164896)+W(6,1010452735,-1122799750,1004868686,-1109767888)+W(7,-1161269496,-1126055830,1023899390,-1130073888);WS(1064255296,1017910760);
sum1=W(0,-1112041607,1053450179,1054734130,1034554881)+W(1,-1098306542,1044871248,1051103338,-1108750194)+W(2,-1117661336,1027829882,-1103441076,-1140839485)+W(3,-1131295699,1024857124,-1122634224,-1142577806)+W(4,1024002066,-1117294562,-1127407003,-1098111935)+W(5,1046694116,-1097130662,1016696883,-1095577677)+W(6,1048629833,-1104687573,983357671,-1111281057)+W(7,1048835924,-1098281839,-1118108640,1032310597);sum2=W(0,1032914397,1073793292,1053966016,-1120767464)+W(1,1040094052,-1072585870,1060302091,-1109760249)+W(2,1009241688,-1113143087,-1094220304,1016200567)+W(3,1032959032,-1104349617,1028063795,-1122384418)+W(4,1040357442,-1129131123,-1147532546,1035968374)+W(5,-1086238928,-1116834009,-1130362887,-1122023462)+W(6,1043210576,1015923256,1036030945,-1172011891)+W(7,-1119727737,1019714285,1017132829,1025380203);WS(-1096343168,-1126236522);
sum1=W(0,1007810299,-1119306439,-1108689250,1030703603)+W(1,1047119465,-1085509191,-1096469888,1040041675)+W(2,-1132527909,1020253526,1056154112,-1113575360)+W(3,1009418349,1033231243,1041829816,-1134236941)+W(4,1031818658,-1127608870,-1121378303,1038321302)+W(5,-1089344732,1045457184,-1126859158,1053153171)+W(6,999324634,1029954693,-1144694086,1045446045)+W(7,-1107897834,1026209383,1019451938,-1115315934);sum2=W(0,1016178696,-1144975071,1020456556,983284602)+W(1,1029986296,1041996066,-1114118472,1029794920)+W(2,-1131549160,-1114876306,-1139464095,-1109420788)+W(3,-1117716768,983229178,1015095008,-1118046352)+W(4,-1131007184,1022946788,1015204808,-1131636264)+W(5,1053737341,1023304596,998054973,997214653)+W(6,-1113647896,1024576522,1029400914,-1097949071)+W(7,-1141234271,-1131778280,-1124860928,-1115559594);WS(1054415488,1031748714);
sum1=W(0,-1106849745,1048190511,1016814449,1032036500)+W(1,998976710,1051815981,1025341687,1032905605)+W(2,1024707071,-1113968464,-1102465150,1035586875)+W(3,1040319748,-1115415046,-1127337837,-1137244643)+W(4,-1110288412,-1119790601,1018567785,-1098109636)+W(5,1042721902,1029877301,1041909072,-1090213441)+W(6,1046144796,-1106536335,1033626399,-1117518441)+W(7,-1135047459,-1122513053,1018599181,-1117570737);sum2=W(0,-1138393335,-1121991569,-1103416430,990440998)+W(1,1002996807,-1100463136,-1128966950,-1115155620)+W(2,-1107496177,1010012987,-1095499559,-1122715509)+W(3,-1100731818,1048400711,1000571127,-1109700727)+W(4,1037302636,-1117267403,1034530622,-1120602807)+W(5,1060125031,-1114490937,1032576586,-1098451061)+W(6,1038403096,-1126507430,-1120765719,1057202890)+W(7,1041385707,-1105804206,1027555951,1011003397);WS(1057399616,1074070393);
sum1=W(0,-1167692925,1048650971,1049855515,-1116946950)+W(1,1027460150,-1096264273,1035712138,1025124136)+W(2,1043057687,-1089515076,-1093603523,1033233658)+W(3,1036180887,-1089497938,-1102565613,1031827147)+W(4,-1103643414,1041758026,1045229301,-1097294408)+W(5,-1106323062,1036926493,1045455640,-1094845877)+W(6,1057610273,-1123310040,1036007790,1045414146)+W(7,1048651645,1034964477,1012034194,1043872372);sum2=W(0,1016280180,-1104821294,-1135117191,-1099019906)+W(1,-1160553787,1057285857,1031344902,-1104956478)+W(2,1040551613,-1096822242,-1108143797,-1115190705)+W(3,1043284947,-1108844527,-1121444630,-1110901592)+W(4,-1108236474,1021862852,-1102919364,1053230727)+W(5,1060881655,-1121198562,-1102746088,1044240449)+W(6,-1110487530,1027740054,-1107568696,-1141578351)+W(7,-1097266933,1039050835,-1115478973,1033167055);WS(-1079272096,-1088198283);
sum1=W(0,-1136809437,-1147892734,-1112293630,-1150549691)+W(1,-1114730926,-1153686203,-1101200910,1035238887)+W(2,1024493634,-1111552818,1033312670,1013948517)+W(3,1007675727,-1115285591,993656219,1014747375)+W(4,-1131332343,1024124492,-1117531256,1038263474)+W(5,-1109365886,1038223988,1022854919,1042949876)+W(6,1033656538,-1131368443,-1137128325,-1123815596)+W(7,1031561484,983503863,-1123012682,999554974);sum2=W(0,933663296,973137042,-1131869901,-1130912341)+W(1,1026863962,-1103034755,1022547165,1024898014)+W(2,1015250909,-1122671508,1032168251,1006981209)+W(3,-1163156681,-1124284861,1002623282,-1128875465)+W(4,1031913949,-1114826138,-1116201618,1021624533)+W(5,1074345895,-1074065991,-1097351564,1049231168)+W(6,1033396431,-1116799454,-1101411998,1046910286)+W(7,987851849,-1131138133,-1122428830,1015118461);WS(1066898592,-1135257599);
sum1=W(0,-1104421608,1036077428,1039457202,-1110180874)+W(1,-1109212258,1047234565,1042328969,-1108282395)+W(2,-1104815307,-1101771699,-1102031401,-1112266449)+W(3,-1107536862,-1105991798,-1107974833,-1117810340)+W(4,-1109956850,1025966004,1033603984,-1099722419)+W(5,1050666829,-1127852161,1027866348,-1108344348)+W(6,1056795268,-1103088922,-1117920074,1052651555)+W(7,1052879183,-1109126692,-1114797145,1044347095);sum2=W(0,-1130272686,-1099761318,1053252716,-1109573955)+W(1,-1135365682,1015950468,1053124236,-1112628352)+W(2,-1109041460,1056516595,1055173972,-1127976571)+W(3,-1124075328,-1111067004,-1111992284,-1141484375)+W(4,1023415227,-1113318439,-1104024699,-1111963093)+W(5,-1098416341,989675628,-1113101390,1036225124)+W(6,-1099834172,1021900236,-1113626094,984548524)+W(7,-1123095583,1035158074,-1121224929,-1115296758);WS(-1080514464,1071098312);
sum1=W(0,1032590577,-1109637973,-1104998922,1029423638)+W(1,1032314563,1052963835,-1100165641,1026820152)+W(2,-1118573868,1051364482,1049180397,-1121041060)+W(3,-1138006521,1046351030,1040988017,-1120807462)+W(4,1035675859,-1116754806,-1121480226,1034143047)+W(5,1044386890,-1124675269,-1119258414,1041959039)+W(6,-1091683740,1026232616,-1141724766,-1094089003)+W(7,-1100071438,-1128189972,-1142663074,-1104568584);sum2=W(0,1015651007,-1161898742,1047440331,-1103917515)+W(1,-1102760582,1064882055,1037971494,-1110033797)+W(2,1038662254,-1095531648,-1094052244,-1111112749)+W(3,1037944898,-1103088589,1028288648,-1114159185)+W(4,-1107946310,1034127906,-1101094893,1045127249)+W(5,1062501861,-1105985747,-1105034150,1032097498)+W(6,-1103513552,1029080884,952358760,-1097807648)+W(7,-1103412727,1036625418,-1115269879,1000704926);WS(1048356096,1025975827);
sum1=W(0,-1122099232,1042373466,1042988217,-1127785256)+W(1,1026577988,1024353684,1057753530,-1101696686)+W(2,1035389109,-1100403603,-1089144738,1038799529)+W(3,1026531900,-1118224663,-1117105634,1026796836)+W(4,-1109964850,985728647,-1113788528,-1143337570)+W(5,1027827940,1025248769,981326605,-1091154007)+W(6,-1125657656,1042938314,1031883373,1052285203)+W(7,-1110632314,1024598728,1041478413,-1109515886);sum2=W(0,-1116521159,-1105350472,-1127410563,1012220951)+W(1,1029633040,-1097063130,1052174871,-1112142878)+W(2,-1123437332,1029744370,-1157154125,-1134401830)+W(3,-1127142758,1031896001,-1133421881,-1127274631)+W(4,1023881724,-1121646209,-1150652997,-1133847817)+W(5,-1106094805,1019540966,-1123898264,1044599155)+W(6,-1111846084,-1113752268,-1101447493,1059986787)+W(7,-1111750394,-1144497399,-1115689394,1028497368);WS(1047538944,-1094881626);
sum1=W(0,-1116924690,1015768341,1026526343,-1131292909)+W(1,1021777101,1006944475,1061821276,-1112297452)+W(2,-1116873677,1042550748,-1091685625,1043477817)+W(3,-1142312694,1025260793,-1112344306,-1148100662)+W(4,1040643394,-1105713526,-1137761291,-1137367995)+W(5,-1090839121,-1122499811,1031500559,-1088680894)+W(6,-1162815447,-1119456201,-1107169411,1059324523)+W(7,1009991259,1032218389,998501030,1036475455);sum2=W(0,1027383442,-1114299623,-1112001321,1018368946)+W(1,-1120907217,1048017951,-1159080892,1026347909)+W(2,1015876554,-1117678872,1043117803,-1113638165)+W(3,-1157376536,-1122492527,1016312397,-1121952605)+W(4,-1113414147,995591994,-1136144308,-1120361628)+W(5,1047229175,-1113455406,-1130300135,-1114902877)+W(6,-1153448320,-1135559770,-1104824263,1034197636)+W(7,-1146986041,1024817261,-1116260909,1030999359);WS(1059019584,-1093542352);
sum1=W(0,1036739212,-1117660736,1030085820,-1118590060)+W(1,1044992135,-1088498407,1053611807,-1117950862)+W(2,-1157350427,1041316489,-1106481599,1031932973)+W(3,-1135788111,1042914684,1033416637,1018600951)+W(4,1037660574,1017695255,-1139295455,1044414089)+W(5,-1087395836,1041445842,-1132182919,1035930184)+W(6,-1101366685,1028651518,-1162575911,1044296603)+W(7,-1105147443,1024137952,1029799946,-1113146202);sum2=W(0,-1129149604,-1096002059,-1098733365,-1139124704)+W(1,1041796064,1042574015,-1099326395,-1112674264)+W(2,983636161,1013026008,993486752,1023328190)+W(3,968306692,1025526661,-1121650464,-1131439188)+W(4,-1139933424,-1120672660,1017748092,-1134878408)+W(5,1054885382,1038924927,1007868832,1006823136)+W(6,1012616072,-1117420588,-1118903044,1040771663)+W(7,1007743024,1016029412,1032346590,-1119789204);WS(1034201600,1032755867);
sum1=W(0,1027758260,-1105013167,-1096012775,-1153568391)+W(1,-1106713574,1052356477,-1096428191,-1120836106)+W(2,-1113115007,1046162344,1040996254,-1110497539)+W(3,-1106649828,1046578147,1026611286,-1129181937)+W(4,1040809774,-1113241540,-1151613767,1054286804)+W(5,1045456334,-1103823871,-1109787424,1052819554)+W(6,-1106901340,-1136669162,-1140335480,-1104715738)+W(7,-1111616164,1018423993,-1129950605,-1119554608);sum2=W(0,-1114916062,1044137813,1046553581,-1116195452)+W(1,1031939547,-1081686100,1039450853,1015539387)+W(2,1002967134,1023858175,-1106570618,1004500534)+W(3,1037899637,1018521363,1032662783,-1116253852)+W(4,1067697792,1023665145,-1133268119,1060291180)+W(5,-1075409426,1033868463,1037512606,1056432615)+W(6,1018449047,-1120650920,1015733077,-1100622921)+W(7,-1106597825,1008358731,1016550645,1002080710);WS(-1092032128,-1114982082);
sum1=W(0,1030256707,-1096516325,-1092594901,1022785838)+W(1,-1129380878,1046024022,-1091986421,1019093490)+W(2,-1112386231,1047446468,-1122621159,-1136259347)+W(3,-1105547264,1044817638,983613607,-1119087591)+W(4,1038780564,-1117764855,-1131318086,1053421570)+W(5,1055287349,-1136363407,-1114799192,1047196191)+W(6,-1103792760,1031400745,-1144800614,-1127922606)+W(7,-1107803612,1035179430,-1141783466,-1127804734);sum2=W(0,-1122718101,-1105911709,-1101864626,1041280609)+W(1,-1105883428,1058683727,-1098031958,1032208518)+W(2,-1105712369,1049511237,-1120084233,1032385022)+W(3,-1100029914,1048360263,-1101782173,1026423073)+W(4,-1103824921,-1107222411,1033694830,-1094055741)+W(5,1064792422,-1108861898,-1124818562,-1096453130)+W(6,1028614917,-1108778587,-1126293810,1036982526)+W(7,1045846387,-1104838815,1022233154,1024411853);WS(-1109129728,1010433912);
sum1=W(0,1006908285,-1105899410,-1096823624,-1117250164)+W(1,-1107144297,1057728383,-1092542200,-1122855062)+W(2,-1123315850,1026000812,1037050434,-1106683568)+W(3,-1125685047,-1122267030,-1117617698,-1130212999)+W(4,1019351431,-1137630799,1019407999,1040646763)+W(5,1064635860,-1105008732,-1109418342,1052048931)+W(6,-1107858814,1029923270,-1114857797,-1117087348)+W(7,-1100117973,1034575732,-1137382471,-1107016783);sum2=W(0,-1146428548,1040260969,-1138461074,-1153548328)+W(1,-1131960189,1057542522,1050908092,-1122720334)+W(2,-1140382642,-1105004761,1046314824,-1105417557)+W(3,1025793768,-1110366356,1024281381,-1130524097)+W(4,-1109276610,1016706951,970383811,-1109953492)+W(5,-1109440842,-1149783528,-1113772244,-1119113122)+W(6,-1140136790,-1114961145,-1111645386,1008998438)+W(7,-1135544654,-1113390177,-1128062487,-1119699464);WS(1028043776,1066748487);
sum1=W(0,1029235758,-1142684082,1042153037,1020869188)+W(1,1035504777,1053860476,1055996350,-1130366216)+W(2,1028701624,-1103910983,-1085695847,1043701316)+W(3,-1122144394,-1125763849,-1112356264,-1140377801)+W(4,-1109061593,1025123714,-1111756535,-1114798157)+W(5,1054127718,1020063133,1039957533,-1084468040)+W(6,-1111428405,1027291444,1020852591,1050138268)+W(7,-1122964802,-1137256281,1023500800,-1142788434);sum2=W(0,924100096,-1119644642,-1129530165,-1124029698)+W(1,-1110737625,1050522694,-1119677450,-1114278109)+W(2,-1121059730,-1121636434,1031715210,-1113250169)+W(3,-1125884533,-1119348450,-1145009875,998717971)+W(4,1007880106,-1133743274,1021970837,-1125964837)+W(5,1051750384,-1114387111,-1118803866,1030663674)+W(6,-1117515026,1025411170,999385235,-1120664914)+W(7,1010693450,-1127692741,1019195093,-1122454562);WS(1060837696,-1133947077);
sum1=W(0,1028161858,-1107876293,1043511426,-1111653883)+W(1,1035200691,-1100826286,1032976162,1026751705)+W(2,-1124636570,-1109841015,1046154066,1000443428)+W(3,1010162044,-1123706233,1028652293,-1153569903)+W(4,1015032078,-1120891991,-1102491073,1035524535)+W(5,-1104551490,-1125941943,-1107214884,1051427819)+W(6,-1105048272,1029969865,1038586510,1014718172)+W(7,-1122173975,990755503,1023653077,-1150803951);sum2=W(0,1027230711,-1130116966,-1124907300,-1109148006)+W(1,-1115012616,1033368851,-1099589874,-1141349815)+W(2,-1129789352,1048790586,-1097709653,1025861327)+W(3,1031045509,1042673858,-1111271581,1018453676)+W(4,-1092832201,1052271642,1058387135,-1092637531)+W(5,1040685020,1019043320,1062146597,-1085994041)+W(6,1056989663,-1089224415,-1085821967,1063174823)+W(7,1044673285,-1096709646,-1100831168,1049450817);WS(1052991104,1024635730);
sum1=W(0,-1113667962,1053766219,1054985227,1035832004)+W(1,-1099876558,-1128304655,1046292645,-1115665493)+W(2,-1123144798,1032906080,-1115760280,-1124670698)+W(3,991927035,1032830229,1011324759,-1141396670)+W(4,1027437528,-1121298600,-1119430356,-1101014640)+W(5,-1148766910,-1098528437,1029858016,-1097461637)+W(6,1048476772,-1107490221,1026860541,-1103841730)+W(7,1048946541,-1098098175,-1114702739,1034147624);sum2=W(0,-1123155104,-1081244300,-1101540780,1023525971)+W(1,-1119336486,1068940029,-1094597742,1037524511)+W(2,-1140931614,998725346,1051860638,-1120201684)+W(3,-1116496860,1038812729,1002156586,1025256785)+W(4,-1107189914,989815561,-1124206084,-1109590196)+W(5,1038949441,1039597181,979200786,1026840221)+W(6,-1110977051,-1128575576,-1126284432,1014639773)+W(7,1033886084,-1117282785,-1123250336,-1117345859);WS(-1106197760,-1107941957);
sum1=W(0,992223587,-1096404880,958134964,-1126741205)+W(1,-1096167611,-1089676235,1050569383,-1103296147)+W(2,1041994672,1020956357,1032016157,-1103227950)+W(3,1027666259,1043412107,-1180953690,-1124973941)+W(4,-1114006205,-1156891819,-1131232109,1042417753)+W(5,-1101748223,-1105076618,-1104768673,1053212362)+W(6,1042030605,-1124618361,-1101041056,1057274419)+W(7,1052224033,-1117167007,-1114495652,1049652990);sum2=W(0,-1149001791,1045400432,1033666378,-1114619118)+W(1,-1090736686,1063026008,924614016,-1110825372)+W(2,1027272732,-1108719036,-1114127208,-1106216772)+W(3,-1120615480,-1114760302,1032301903,1033544093)+W(4,-1103940412,-1125963088,1027002418,1015708744)+W(5,1059931802,-1091159350,-1103385448,-1107881456)+W(6,1024735270,-1125128312,-1139192735,-1107266078)+W(7,1034226031,1032462491,1019689496,-1134995311);WS(-1076602784,-1079939509);
sum1=W(0,-1124683769,-1119780485,-1103738752,1033209209)+W(1,-1141354248,1042233324,-1096323000,1015980198)+W(2,-1114123684,1052850909,1054450248,-1106007132)+W(3,1019464370,1045060053,1043529432,-1121157953)+W(4,1041533536,-1112424745,1002177000,1025390185)+W(5,1039917313,-1113895617,-1104846498,1052087227)+W(6,-1098158311,-1112376802,-1119444855,-1105614956)+W(7,-1103437636,-1109951699,1021969694,-1107965437);sum2=W(0,-1119329897,-1117977933,-1106233686,1032197744)+W(1,1042368013,-1074309068,-1119744119,1026978731)+W(2,-1109569271,1064708176,1068607081,1034747948)+W(3,-1111213511,1041980892,-1119111329,1037031349)+W(4,1035649904,-1113988579,1036373860,-1119285117)+W(5,-1080074847,-1148379867,-1150690390,1046616172)+W(6,1043980108,-1113275705,1031972703,1045039448)+W(7,1028259198,1008019670,1015848847,1029320825);WS(-1093673600,-1131421273);
sum1=W(0,-1126420325,-1110871822,-1114120908,-1121371719)+W(1,1021303790,-1118558279,-1087025669,1033366837)+W(2,1011797877,1032969664,1056872571,-1117842165)+W(3,-1131840478,1040800018,1037611499,1021502382)+W(4,1021798446,1008740253,1009001293,1035660544)+W(5,1042294182,1022689127,-1120291359,1058317703)+W(6,-1114500968,-1148303562,1031810222,-1088792724)+W(7,1017988942,-1121301883,-1137856917,-1111697864);sum2=W(0,-1129835426,-1119983153,-1114206314,-1145039688)+W(1,-1110668832,1051729955,-1121785409,-1119915157)+W(2,1002833896,-1118223897,1012089860,-1111519800)+W(3,1006052904,-1123764449,-1130809610,-1127947266)+W(4,-1113040628,1000979816,1020565626,-1116540509)+W(5,1051989643,-1112437186,989230112,-1118504757)+W(6,1025479957,1015165050,-1112214518,1039755978)+W(7,-1127132522,1025956493,-1128941978,-1158783904);WS(1065682080,-1111828541);
sum1=W(0,1017604463,-1115077208,-1145885026,1015869752)+W(1,1024786188,-1121697500,1052074397,-1112250175)+W(2,1002255762,1045248549,-1086889687,1036568133)+W(3,982208647,1037568127,-1130857684,-1131800664)+W(4,1021224792,1032942526,-1126764880,1022264616)+W(5,1047440331,1035803452,1040282413,-1089954536)+W(6,-1109225970,1031850711,-1125683619,1049268572)+W(7,-1113425822,1017131424,-1141787602,-1123514660);sum2=W(0,1016040732,968811648,1016858600,-1122978131)+W(1,-1125004872,1051074882,1029169324,-1114060649)+W(2,1026938249,-1154135582,1006053609,1029971540)+W(3,-1124460348,-1140773838,-1115290499,1017189437)+W(4,1021399769,-1144040913,993636865,1028741871)+W(5,1031746308,-1109484363,-1118019503,1032336595)+W(6,-1113140779,1013417282,-1124468225,-1103346234)+W(7,-1122277912,-1139883250,-1169769501,-1141169189);WS(1068575136,1057679145);
sum1=W(0,1008215334,1049251178,1049880682,-1106541599)+W(1,1042310507,-1095539136,1026486412,989927934)+W(2,1040070410,-1089191083,-1094672658,1018512183)+W(3,1041475113,-1087252724,-1100618939,1014261304)+W(4,-1111487207,1042509671,1052783569,-1093397815)+W(5,-1103138323,1040579493,1051194971,-1092992340)+W(6,1057944056,-1114567880,1038856114,1043830943)+W(7,1049811244,1038361721,1025292508,1044894993);sum2=W(0,-1136765855,1055007475,1053593458,-1114445084)+W(1,-1113238946,-1078800745,-1105638736,1039574032)+W(2,-1106803932,1059224194,-1104375874,1030357662)+W(3,-1113028634,1035501186,1050059734,964162478)+W(4,1054334485,-1141017037,-1150175899,1057823779)+W(5,-1078443122,-1134493359,1042094581,-1096181786)+W(6,1058193036,-1099695416,1020483059,1049857835)+W(7,1029634285,-1110238952,-1118569338,1043677394);WS(-1069843280,1043992756);
sum1=W(0,-1135429253,-1119099178,1027695014,-1124948267)+W(1,1025838726,-1113789227,1044103833,1025550072)+W(2,-1116233196,1024839950,1039477491,1019242118)+W(3,-1130610171,1028120504,-1142719774,998797102)+W(4,1017935435,-1129507307,1008956039,-1108770183)+W(5,-1130965835,1014849865,1030807982,-1112757821)+W(6,-1101790135,1035190516,-1114625158,1042243413)+W(7,-1106167085,1023573770,-1127852007,1012540023);sum2=W(0,-1121247640,1028491168,1026300352,-1114838118)+W(1,-1072953064,1074653957,1053083344,-1095359738)+W(2,-1115141896,1033233928,1056568596,-1093135708)+W(3,-1127503160,1023653964,1030713448,-1116140314)+W(4,-1130258048,-1127851536,-1130791968,1004928481)+W(5,-1102013621,1030571860,1025789396,1024432884)+W(6,-1116002270,1025870428,984097412,1030571276)+W(7,-1129660856,1016702232,-1120604784,1015669456);WS(1066802848,-1129257078);
sum1=W(0,-1118978065,-1155453851,1033473243,1015630667)+W(1,-1101616805,1065736411,1035395194,-1113784260)+W(2,-1114908350,1040181775,1045542397,-1108037466)+W(3,-1111947911,1036229652,-1177594330,-1114956027)+W(4,-1122431286,-1121467910,-1114728473,-1104672775)+W(5,1061324843,-1095556296,-1105320751,-1115117829)+W(6,-1114134583,-1109993148,-1104703871,-1100789945)+W(7,-1138173719,-1106051686,-1111474306,-1124148059);sum2=W(0,-1134031950,-1108713026,-1155123513,-1109560646)+W(1,1017238679,1026897780,1038996664,-1107125821)+W(2,-1127256871,-1107869542,-1107646918,1024343484)+W(3,-1129735047,-1145442397,-1112902766,1004378333)+W(4,-1107664082,1019412439,-1115008786,1035199782)+W(5,1051508948,1016515095,-1123597732,1043157052)+W(6,998755997,-1116358964,-1106563795,1055083262)+W(7,1012570830,-1110777694,-1117600772,-1159444594);WS(-1093453440,1062530498);
sum1=W(0,1018166794,-1109318263,-1115495349,-1124930739)+W(1,-1114300581,1040214918,1024699176,-1109529502)+W(2,1023247327,1043329716,-1105577322,1025096231)+W(3,-1125424515,1034740398,-1123543752,998443854)+W(4,1039727605,1023563962,1023868966,1025637074)+W(5,1052285453,-1104984446,-1131885027,931786146)+W(6,-1105534248,-1137647791,-1110072888,1009762919)+W(7,-1116356474,1018092315,-1123805240,988548151);sum2=W(0,-1110334365,-1135013993,1018118074,-1116378324)+W(1,-1134041225,-1097345050,-1117515615,-1139723269)+W(2,-1112237914,-1107830137,1039717826,-1147091114)+W(3,-1131603942,978891919,1032288465,-1123080609)+W(4,1002595554,-1111471528,-1110082211,1027066059)+W(5,1043336959,1040454031,-1114430561,1053899571)+W(6,1010598309,-1117546906,1033656482,1040668505)+W(7,1026333875,-1119917138,-1115822981,1016807738);WS(1067735712,-1080534052);
return clamp(mstd0 + 5.0 * vsum / wsum * mstd1, 0.0, 1.0);
}  // nnedi3
vec4 hook() {
vec4 ret = vec4(0.0);
vec4 samples[8];
samples[0] = HOOKED_mul * textureGatherOffset(HOOKED_raw, HOOKED_pos, ivec2(-1, -3), 0);
samples[1] = HOOKED_mul * textureGatherOffset(HOOKED_raw, HOOKED_pos, ivec2(-1, -1), 0);
samples[2] = HOOKED_mul * textureGatherOffset(HOOKED_raw, HOOKED_pos, ivec2(-1, 1), 0);
samples[3] = HOOKED_mul * textureGatherOffset(HOOKED_raw, HOOKED_pos, ivec2(-1, 3), 0);
samples[4] = HOOKED_mul * textureGatherOffset(HOOKED_raw, HOOKED_pos, ivec2(1, -3), 0);
samples[5] = HOOKED_mul * textureGatherOffset(HOOKED_raw, HOOKED_pos, ivec2(1, -1), 0);
samples[6] = HOOKED_mul * textureGatherOffset(HOOKED_raw, HOOKED_pos, ivec2(1, 1), 0);
samples[7] = HOOKED_mul * textureGatherOffset(HOOKED_raw, HOOKED_pos, ivec2(1, 3), 0);
ret[0] = nnedi3(samples);
return ret;
}  // hook
//!DESC NNEDI3 (combine_x, nns32, win8x4)
//!HOOK LUMA
//!BIND HOOKED
//!BIND nnedi3_int
//!WIDTH 2 HOOKED.w *
//!OFFSET -0.500000 0.000000
//!WHEN HOOKED.w OUTPUT.w / 0.833333 <
vec4 hook() {
    vec2 dir = fract(HOOKED_pos * HOOKED_size) - 0.5;
    if (dir.x < 0.0) {
        return HOOKED_texOff(-dir);
    } else {
        return nnedi3_int_texOff(-dir);
    }
}
